import 'package:get/get.dart';

import '../../../../common/common_config.dart';

class MineModel {
  late String id;
  late String router;
  late String title;
  late String icon;
  late String url;
  late String reMark;

  static MineModel fromJson(Map map) {
    var model = MineModel();
    model.id = map["id"] ?? "";
    model.router = map["router"] ?? "";
    model.title = map["title"].toString().tr ?? "";
    model.icon = map["icon"] ?? "";
    if(model.id == "userPolicy") {
      model.url = CommonConfig.configUserPolicy;
    }else if(model.id == "privacyPolicy") {
      model.url = CommonConfig.configPrivacyPolicy;
    }else{
      model.url = map["url"] ?? "";
    }
    model.reMark = map["remark"] ?? "";
    return model;
  }
}
